{% extends "base.html" %}
{% load i18n %}
{% block  title %}{% trans 'Server List' %}{% endblock %}
{% load bootstrap3 %}
{% load static %}



{% block header-css %}
    <link href="{% static 'css/plugins/select2/select2.min.css' %}" rel="stylesheet">
{% endblock %}

{% block page-content %}


    <div class="row wrapper border-bottom white-bg page-heading">
        <div class="col-lg-10">
             <h2>{% trans 'Server List' %}</h2>
            <ol class="breadcrumb">
                <li>
                     <a href="/">{% trans 'Home' %}</a>
                </li>
                <li>
                    <a href="{% url "asset:asset_list" %}">{% trans 'Service Manage' %}</a>
                </li>
                <li class="active">
                    <strong>{% trans 'Server List' %}</strong>
                </li>
            </ol>
        </div>
        <div class="col-lg-2">

        </div>
    </div>


    <div class="wrapper wrapper-content animated fadeInRight   ">
        <div class="row">
            <div class="col-lg-12" id="split-right">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>{% trans 'Server List' %}</h5>
                        <div class="ibox-tools">
                            <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                            <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                                <i class="fa fa-wrench"></i>
                            </a>
                            <ul class="dropdown-menu dropdown-user">
                                <li><a href="#" >{% trans 'Config Option 1' %}</a>
                                </li>
                                <li><a href="#" >{% trans 'Config Option 2' %}</a>
                                </li>
                            </ul>
                            <a class="close-link">
                                <i class="fa fa-times"></i>
                            </a>
                        </div>
                    </div>
                <div class="ibox-content">

                    <form enctype="multipart/form-data" method="post" class="form-horizontal" action="">
                        {% csrf_token %}
                        {% if form.errors %}
                            <div class="alert alert-danger" style="margin: 20px auto 0px">
                                {{ form.errors }}
                            </div>
                        {% endif %}

                        <div class="form-group">
                            <div class="col-sm-10 col-sm-offset-0">
                                <h3>{% trans 'basic' %}</h3>
                                {% bootstrap_field form.hostname layout="horizontal" %}
                                {% bootstrap_field form.ip layout="horizontal" %}
                                {% bootstrap_field form.other_ip layout="horizontal" %}
                                {% bootstrap_field form.port layout="horizontal" %}
                                {% bootstrap_field form.user layout="horizontal" %}
                                {% bootstrap_field form.password layout="horizontal" %}
                                {% bootstrap_field form.asset_type layout="horizontal" %}
                                {% bootstrap_field form.status layout="horizontal" %}
                                {% bootstrap_field form.project layout="horizontal" %}
                                {% bootstrap_field form.idc layout="horizontal" %}
                                {% bootstrap_field form.product layout="horizontal" %}
                                {% bootstrap_field form.work_env layout="horizontal" %}
                                {% bootstrap_field form.use layout="horizontal" %}
                                {% bootstrap_field form.os_type layout="horizontal" %}
                                {% bootstrap_field form.system_version layout="horizontal" %}
                                {% bootstrap_field form.mac layout="horizontal" %}
                                {% bootstrap_field form.cpu_type layout="horizontal" %}
                                {% bootstrap_field form.cpu_core layout="horizontal" %}
                                {% bootstrap_field form.cpu_total layout="horizontal" %}
                                {% bootstrap_field form.sn layout="horizontal" %}
                                {% bootstrap_field form.memory layout="horizontal" %}
                                {% bootstrap_field form.disk_info layout="horizontal" %}
                                {% bootstrap_field form.disk_mount layout="horizontal" %}
                                {% bootstrap_field form.server_type layout="horizontal" %}
                                {% bootstrap_field form.os_kernel layout="horizontal" %}
                                {% bootstrap_field form.system_arch layout="horizontal" %}
                            </div>
                        </div>
                        <input type="hidden" name="__next__" value="{{ i__next__ }}">


                        <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-3">

                                {% bootstrap_button "保存" id="submit_button" button_type="submit" button_class="btn-primary" %}

                                <a class="btn btn-white" href="{{ i__next__ }}">取消</a>
                            </div>
                        </div>

                    </form>


                </div>
            </div>
        </div>

        </div>
    </div>






{% endblock %}

{% block footer-js %}
    <script src="{% static 'js/plugins/select2/select2.full.min.js' %}"></script>
    <script>
        $(document).ready(function () {
            $('.select2').select2({closeOnSelect: false});

        });
    </script>
{% endblock %}
